package com.server.Example;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * The type Movies type example.
 */
public class MoviesTypeExample {
    /**
     * The Order by clause.
     */
    protected String orderByClause;

    /**
     * The Distinct.
     */
    protected boolean distinct;

    /**
     * The Ored criteria.
     */
    protected List<Criteria> oredCriteria;

    /**
     * Instantiates a new Movies type example.
     */
    public MoviesTypeExample() {
        oredCriteria = new ArrayList<>();
    }

    /**
     * Sets order by clause.
     *
     * @param orderByClause the order by clause
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * Gets order by clause.
     *
     * @return the order by clause
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * Sets distinct.
     *
     * @param distinct the distinct
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * Is distinct boolean.
     *
     * @return the boolean
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * Gets ored criteria.
     *
     * @return the ored criteria
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * Or.
     *
     * @param criteria the criteria
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * Or criteria.
     *
     * @return the criteria
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * Create criteria criteria.
     *
     * @return the criteria
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * Create criteria internal criteria.
     *
     * @return the criteria
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * Clear.
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * The type Generated criteria.
     */
    protected abstract static class GeneratedCriteria {
        /**
         * The Criteria.
         */
        protected List<Criterion> criteria;

        /**
         * Instantiates a new Generated criteria.
         */
        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        /**
         * Is valid boolean.
         *
         * @return the boolean
         */
        public boolean isValid() {
            return criteria.size() > 0;
        }

        /**
         * Gets all criteria.
         *
         * @return the all criteria
         */
        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        /**
         * Gets criteria.
         *
         * @return the criteria
         */
        public List<Criterion> getCriteria() {
            return criteria;
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         */
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         * @param value     the value
         * @param property  the property
         */
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        /**
         * Add criterion.
         *
         * @param condition the condition
         * @param value1    the value 1
         * @param value2    the value 2
         * @param property  the property
         */
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        /**
         * And movies type id is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeIdIsNull() {
            addCriterion("Movies_Type_id is null");
            return (Criteria) this;
        }

        /**
         * And movies type id is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeIdIsNotNull() {
            addCriterion("Movies_Type_id is not null");
            return (Criteria) this;
        }

        /**
         * And movies type id equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIdEqualTo(Integer value) {
            addCriterion("Movies_Type_id =", value, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIdNotEqualTo(Integer value) {
            addCriterion("Movies_Type_id <>", value, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIdGreaterThan(Integer value) {
            addCriterion("Movies_Type_id >", value, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("Movies_Type_id >=", value, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIdLessThan(Integer value) {
            addCriterion("Movies_Type_id <", value, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("Movies_Type_id <=", value, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeIdIn(List<Integer> values) {
            addCriterion("Movies_Type_id in", values, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeIdNotIn(List<Integer> values) {
            addCriterion("Movies_Type_id not in", values, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("Movies_Type_id between", value1, value2, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type id not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("Movies_Type_id not between", value1, value2, "moviesTypeId");
            return (Criteria) this;
        }

        /**
         * And movies type name is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeNameIsNull() {
            addCriterion("Movies_Type_Name is null");
            return (Criteria) this;
        }

        /**
         * And movies type name is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeNameIsNotNull() {
            addCriterion("Movies_Type_Name is not null");
            return (Criteria) this;
        }

        /**
         * And movies type name equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeNameEqualTo(String value) {
            addCriterion("Movies_Type_Name =", value, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeNameNotEqualTo(String value) {
            addCriterion("Movies_Type_Name <>", value, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeNameGreaterThan(String value) {
            addCriterion("Movies_Type_Name >", value, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeNameGreaterThanOrEqualTo(String value) {
            addCriterion("Movies_Type_Name >=", value, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeNameLessThan(String value) {
            addCriterion("Movies_Type_Name <", value, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeNameLessThanOrEqualTo(String value) {
            addCriterion("Movies_Type_Name <=", value, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name like criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeNameLike(String value) {
            addCriterion("Movies_Type_Name like", value, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name not like criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeNameNotLike(String value) {
            addCriterion("Movies_Type_Name not like", value, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeNameIn(List<String> values) {
            addCriterion("Movies_Type_Name in", values, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeNameNotIn(List<String> values) {
            addCriterion("Movies_Type_Name not in", values, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeNameBetween(String value1, String value2) {
            addCriterion("Movies_Type_Name between", value1, value2, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type name not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeNameNotBetween(String value1, String value2) {
            addCriterion("Movies_Type_Name not between", value1, value2, "moviesTypeName");
            return (Criteria) this;
        }

        /**
         * And movies type is show is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowIsNull() {
            addCriterion("Movies_Type_Is_Show is null");
            return (Criteria) this;
        }

        /**
         * And movies type is show is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowIsNotNull() {
            addCriterion("Movies_Type_Is_Show is not null");
            return (Criteria) this;
        }

        /**
         * And movies type is show equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowEqualTo(Boolean value) {
            addCriterion("Movies_Type_Is_Show =", value, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowNotEqualTo(Boolean value) {
            addCriterion("Movies_Type_Is_Show <>", value, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowGreaterThan(Boolean value) {
            addCriterion("Movies_Type_Is_Show >", value, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowGreaterThanOrEqualTo(Boolean value) {
            addCriterion("Movies_Type_Is_Show >=", value, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowLessThan(Boolean value) {
            addCriterion("Movies_Type_Is_Show <", value, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowLessThanOrEqualTo(Boolean value) {
            addCriterion("Movies_Type_Is_Show <=", value, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowIn(List<Boolean> values) {
            addCriterion("Movies_Type_Is_Show in", values, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowNotIn(List<Boolean> values) {
            addCriterion("Movies_Type_Is_Show not in", values, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowBetween(Boolean value1, Boolean value2) {
            addCriterion("Movies_Type_Is_Show between", value1, value2, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type is show not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeIsShowNotBetween(Boolean value1, Boolean value2) {
            addCriterion("Movies_Type_Is_Show not between", value1, value2, "moviesTypeIsShow");
            return (Criteria) this;
        }

        /**
         * And movies type create is null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateIsNull() {
            addCriterion("Movies_Type_create is null");
            return (Criteria) this;
        }

        /**
         * And movies type create is not null criteria.
         *
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateIsNotNull() {
            addCriterion("Movies_Type_create is not null");
            return (Criteria) this;
        }

        /**
         * And movies type create equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateEqualTo(Date value) {
            addCriterion("Movies_Type_create =", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create not equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateNotEqualTo(Date value) {
            addCriterion("Movies_Type_create <>", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create greater than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateGreaterThan(Date value) {
            addCriterion("Movies_Type_create >", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create greater than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateGreaterThanOrEqualTo(Date value) {
            addCriterion("Movies_Type_create >=", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create less than criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateLessThan(Date value) {
            addCriterion("Movies_Type_create <", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create less than or equal to criteria.
         *
         * @param value the value
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateLessThanOrEqualTo(Date value) {
            addCriterion("Movies_Type_create <=", value, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateIn(List<Date> values) {
            addCriterion("Movies_Type_create in", values, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create not in criteria.
         *
         * @param values the values
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateNotIn(List<Date> values) {
            addCriterion("Movies_Type_create not in", values, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateBetween(Date value1, Date value2) {
            addCriterion("Movies_Type_create between", value1, value2, "moviesTypeCreate");
            return (Criteria) this;
        }

        /**
         * And movies type create not between criteria.
         *
         * @param value1 the value 1
         * @param value2 the value 2
         * @return the criteria
         */
        public Criteria andMoviesTypeCreateNotBetween(Date value1, Date value2) {
            addCriterion("Movies_Type_create not between", value1, value2, "moviesTypeCreate");
            return (Criteria) this;
        }
    }

    /**
     * The type Criteria.
     */
    public static class Criteria extends GeneratedCriteria {
        /**
         * Instantiates a new Criteria.
         */
        protected Criteria() {
            super();
        }
    }

    /**
     * The type Criterion.
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        /**
         * Gets condition.
         *
         * @return the condition
         */
        public String getCondition() {
            return condition;
        }

        /**
         * Gets value.
         *
         * @return the value
         */
        public Object getValue() {
            return value;
        }

        /**
         * Gets second value.
         *
         * @return the second value
         */
        public Object getSecondValue() {
            return secondValue;
        }

        /**
         * Is no value boolean.
         *
         * @return the boolean
         */
        public boolean isNoValue() {
            return noValue;
        }

        /**
         * Is single value boolean.
         *
         * @return the boolean
         */
        public boolean isSingleValue() {
            return singleValue;
        }

        /**
         * Is between value boolean.
         *
         * @return the boolean
         */
        public boolean isBetweenValue() {
            return betweenValue;
        }

        /**
         * Is list value boolean.
         *
         * @return the boolean
         */
        public boolean isListValue() {
            return listValue;
        }

        /**
         * Gets type handler.
         *
         * @return the type handler
         */
        public String getTypeHandler() {
            return typeHandler;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition the condition
         */
        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param typeHandler the type handler
         */
        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition the condition
         * @param value     the value
         */
        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param secondValue the second value
         * @param typeHandler the type handler
         */
        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        /**
         * Instantiates a new Criterion.
         *
         * @param condition   the condition
         * @param value       the value
         * @param secondValue the second value
         */
        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}